package com.mes.check.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.context.annotation.Lazy;

import com.mes.basicdata.domain.Employee;
import com.mes.basicdata.domain.OperationMeasurement;
import com.mes.common.domain.BasicModel;

/**
 * <p>
 * 让步单明细
 * </p>
 */
@Entity()
@Table(name = "M_REPAIRDETAIL")
@BatchSize(size=20)
@Lazy(value=true)
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Deprecated
public class RepairDetail extends BasicModel implements
		java.io.Serializable {


	/**
	 * 复杂对象映射--Repair repair
	 */

	@Id
	@GenericGenerator(name = "uniqueId", strategy = "assigned")
	@Column(name="UNIQUEID")
	protected String uniqueId;
	
	@Column(name="REPAIRUID",length=50)
	protected String repairUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REPAIRUID", insertable = false, updatable = false)
	protected Repair repair;
	
	@Column(name="SEQ",length=50)
	protected Long seq;
	

	@Column(name="DEFECTDESC",length=50)
	protected String defectDesc;
	
	@Column(name="MATERIALSNS",length=50)
	protected String materialSns;

	@Column(name="CHECKER",length=50)
	protected String checkerUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHECKER", insertable = false, updatable = false)
	protected Employee checker;
	

	@Column(name="CHECKTIME",length=50)
	protected Date checkTime;
	
	@Column(name="DEFECTREASON",length=50)
	protected String defectReason;
	
	@Column(name="REPAIRMETHOD",length=50)
	protected String repairMethod;
	

	@Column(name="REPAIRQTY",length=50)
	protected Float repairQty;

	@Column(name="MEASUREMENTUID",length=50)
	protected String measurementUid;
	
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEASUREMENTUID", insertable = false, updatable = false)
	protected OperationMeasurement operationMeasurement;


	/**
	 * 空函数构造方法
	 */
	public RepairDetail() {
	}

	/**
	 * 获取序列号。
	 * 
	 * @return the seq
	 */
	
	public Long getSeq() {
		return seq;
	}

	/**
	 * 设置序列号。
	 * 
	 * @param seq
	 *            the seq to set
	 */
	public void setSeq(Long seq) {
		this.seq = seq;
	}

	/**
	 * 获取让步单号。
	 * 
	 * @return the repairUid
	 */
	
	public String getRepairUid() {
		return repairUid;
	}

	/**
	 * 设置让步单号。
	 * 
	 * @param repairUid
	 *            the repairUid to set
	 */
	public void setRepairUid(String repairUid) {
		this.repairUid = repairUid;
	}

	/**
	 * 获取让步单表头信息。
	 * 
	 * @return the repair
	 */
	
	public Repair getRepair() {
		return repair;
	}

	/**
	 * 设置让步单表头信息。
	 * 
	 * @param repair
	 *            the repair to set
	 */
	public void setRepair(Repair repair) {
		this.repair = repair;
	}

	/**
	 * 获取不合格品描述信息。
	 * 
	 * @return the defectDesc
	 */
	
	public String getDefectDesc() {
		return defectDesc;
	}

	/**
	 * 设置不合格品描述信息。
	 * 
	 * @param defectDesc
	 *            the defectDesc to set
	 */
	public void setDefectDesc(String defectDesc) {
		this.defectDesc = defectDesc;
	}

	/**
	 * 获取材料或零件组编号。
	 * 
	 * @return the materialSns
	 */
	
	public String getMaterialSns() {
		return materialSns;
	}

	/**
	 * 设置材料或零件组编号。
	 * 
	 * @param materialSns
	 *            the materialSns to set
	 */
	public void setMaterialSns(String materialSns) {
		this.materialSns = materialSns;
	}

	/**
	 * 获取检验者工作编号。
	 * 
	 * @return the checkerUid
	 */
	
	public String getCheckerUid() {
		return checkerUid;
	}

	/**
	 * 设置检验者工作编号。
	 * 
	 * @param checkerUid
	 *            the checkerUid to set
	 */
	public void setCheckerUid(String checkerUid) {
		this.checkerUid = checkerUid;
	}

	/**
	 * 获取检验者名字。
	 * 
	 * @return the checker
	 */
	
	public Employee getChecker() {
		return checker;
	}

	/**
	 * 设置检验者名字。
	 * 
	 * @param checker
	 *            the checker to set
	 */
	public void setChecker(Employee checker) {
		this.checker = checker;
	}

	/**
	 * 获取创建者信息。
	 * 
	 * @return the creator
	 */
	
	public Employee getCreator() {
		return creator;
	}

	/**
	 * 设置创建者信息。
	 * 
	 * @param creator
	 *            the creator to set
	 */
	public void setCreator(Employee creator) {
		this.creator = creator;
	}

	/**
	 * 获取检验时间日期。
	 * 
	 * @return the checkTime
	 */
	
	public Date getCheckTime() {
		return checkTime;
	}

	/**
	 * 设置检验时间日期。
	 * 
	 * @param checkTime
	 *            the checkTime to set
	 */
	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}

	/**
	 * 获取不合格品产生原因。
	 * 
	 * @return the defectReason
	 */
	
	public String getDefectReason() {
		return defectReason;
	}

	/**
	 * 设置不合格品产生原因。
	 * 
	 * @param defectReason
	 *            the defectReason to set
	 */
	public void setDefectReason(String defectReason) {
		this.defectReason = defectReason;
	}

	/**
	 * 获取让步方法。
	 * 
	 * @return the repairMethod
	 */
	
	public String getRepairMethod() {
		return repairMethod;
	}

	/**
	 * 设置让步方法。
	 * 
	 * @param repairMethod
	 *            the repairMethod to set
	 */
	public void setRepairMethod(String repairMethod) {
		this.repairMethod = repairMethod;
	}

	/**
	 * 获取让步产品数量。
	 * 
	 * @return the repairQty
	 */
	
	public Float getRepairQty() {
		return repairQty;
	}

	/**
	 * 设置让步产品数量。
	 * 
	 * @param repairQty
	 *            the repairQty to set
	 */
	public void setRepairQty(Float repairQty) {
		this.repairQty = repairQty;
	}

	/**
	 * 获取检验方法编号。
	 * 
	 * @return the measurementUid
	 */
	
	public String getMeasurementUid() {
		return measurementUid;
	}

	/**
	 * 设置检验方法编号。
	 * 
	 * @param measurementUid
	 *            the measurementUid to set
	 */
	public void setMeasurementUid(String measurementUid) {
		this.measurementUid = measurementUid;
	}

	/**
	 * 获取关联的检验方法编号。
	 * 
	 * @return the operationMeasurement
	 */
	
	public OperationMeasurement getOperationMeasurement() {
		return operationMeasurement;
	}

	/**
	 * 获取关联的检验方法编号。
	 * 
	 * @param operationMeasurement
	 *            the operationMeasurement to set
	 */
	public void setOperationMeasurement(
			OperationMeasurement operationMeasurement) {
		this.operationMeasurement = operationMeasurement;
	}
}
